﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Micronet.OpenWeb.Com.Base;

namespace Micronet.OpenWeb.OpenWeb.Admin.Views.Sites
{
    public partial class TryViewCart : OwBasePageCore
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void abc_SelectedIndexChanged(object sender, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
        {
            MyCart Cart;
            if (Session["MyCart"] != null)
                Cart = (MyCart)Session["MyCart"];
            else Cart = new MyCart();
            int shopProductId = int.Parse(abc.SelectedValue);
            Cart.Add(shopProductId, 1);
            Session["MyCart"] = Cart;
            Response.Redirect("ViewCart.aspx?shopProductID=" + shopProductId);
        }
    }
}